package com.agent.payment.api.feign;

import com.agent.common.result.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.math.BigDecimal;

/**
 * 支付服务Feign客户端
 * @author Jeff_Wan
 * @description 提供支付服务的远程调用接口
 */
@FeignClient(name = "payment-service", contextId = "payment", path = "/api/payment")
public interface PaymentFeignClient {
    /**
     * 处理支付
     * @param userId 用户ID
     * @param amount 支付金额
     * @param paymentType 支付类型
     * @return 支付是否成功
     */
    @PostMapping("/payments/process")
    ApiResponse<Boolean> processPayment(
            @RequestParam("userId") Long userId,
            @RequestParam("amount") BigDecimal amount,
            @RequestParam("paymentType") String paymentType);
}